import tensorflow as tf
import numpy as np
import  cv2
from PIL import Image
import os

image_train_path='./train/mypic/'
label_train_path='./train/test.txt'
tfRecord_train='./data/train.tfrecords'
image_test_path='./test/mypic/'
label_test_path='./test/test.txt'
tfRecord_test='./data/test.tfrecords'
data_path='./data'
resize_height = 28
resize_width = 28


f = open(label_train_path, 'r')
contents = f.readlines()
f.close()
i=0
for content in contents  :
    if i > 5:
        break
    value = content.split()
    img_path = image_train_path + value[0]
    img = Image.open(img_path)
    img.show()
    i=i+1
    # cv2.imshow("hello",img)
    # img_raw = img.tobytes()
    labels = [0] * 10
    # labels[int(value[1])] = 1
    print(labels)